<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>

</body>
<script>
let obj = {username: 'zs', age: 20, data: {data: '123', success:false, message: '产生错误'}}
//(1)普通解构
// let {username, age} = obj
// console.log(username, age)
//(2)层层解构,特征 : {}
// let {data: {success, message}} = obj
// console.log(success, message)
//(3)取别名,特征: 变量
let {data: {data: token}} = obj
console.log(token)
</script>
</html>
